package com.hmall.order.utils;

public class UserHolder {
    private static ThreadLocal<Long> local = new ThreadLocal<>();

    public static void setUser(Long userId) {
        local.set(userId);
    }

    public static Long getUser() {
        return local.get();
    }

    public static void removeUser() {
        local.remove();
    }
}
